This project demonstrates spatial analysis
counties <- read_sf(here("_posts", "spatial_analysis", "data", "tl_2016_us_county", "tl_2016_us_county.shp")) %>%
filter(STATEFP == "06")
oil_spills_ca <- read_sf(here("_posts", "spatial_analysis", "data", "Oil_Spill_Incident_Tracking_%5Bds394%5D-shp", "Oil_Spill_Incident_Tracking_%5Bds394%5D.shp" )) %>%
st_transform(st_crs(counties))
oil_spills_ca_inland <- oil_spills_ca %>%
filter(INLANDMARI == "Inland")
inland_oil_spills_counts <- counties %>%
st_join(oil_spills_ca_inland) %>%
count(LOCALECOUN)